docker elastic search commands - 

# To pull the elastic search image from docker hub.
docker pull docker.elastic.co/elasticsearch/elasticsearch:7.7.0

# To start the docker container in foreground. 
# If user wants to run the container in the background they can add the '-d' attribute to the run command.
docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.7.0


